package com.niit;

import com.niit.beans.Cat;
import com.niit.beans.Zoo;
import com.niit.config.BeanConfiguration;
import com.niit.config.BeanConfiguration2;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
    public static void main(String[] args) {

        ApplicationContext ctx
                = new AnnotationConfigApplicationContext(
                BeanConfiguration.class, BeanConfiguration2.class);

        Cat cat = ctx.getBean(Cat.class);
        cat.miao();

        Zoo zoo = ctx.getBean(Zoo.class);
        zoo.show();
    }
}